// for disabling right click use this as it is
document.addEventListener('contextmenu', event => event.preventDefault());
event.preventDefault()
<body oncontextmenu="return false"> <div></div></body>
document.addEventListener('contextmenu', event => event.preventDefault());
// ⇓ Test it (fiddle) ⇓